package com.mindskip.xzs.service;

import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.domain.dto.student.exampaper.ExamPaperAnswerUpdate;
import com.mindskip.xzs.domain.dto.student.qusetion.QuestionPageStudentDTO;
import com.mindskip.xzs.domain.entity.ExamPaperQuestionCustomerAnswer;
import com.mindskip.xzs.domain.entity.User;
import com.mindskip.xzs.domain.vo.student.exampaper.ExamPaperAnswerItemVO;
import com.mindskip.xzs.domain.vo.student.question.QuestionPageStudentVO;
import com.mindskip.xzs.domain.vo.student.question.QuestionSelectStudentVO;
import org.springframework.stereotype.Service;

import java.util.List;

public interface ExamPaperQuestionCustomerAnswerService extends BaseService<ExamPaperQuestionCustomerAnswer> {

    // 得到总答题数
    Integer selectAllCount();

    // 得到当前月份每天的答题数
    List<Integer> selectMonthCount();

    // 试卷提交答案入库
    int insertList(List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers);

    List<ExamPaperQuestionCustomerAnswer> getExamPaperQuestionCustomerAnswerByExamPaperAnswerId(Integer examPaperAnswerId);

    ExamPaperAnswerItemVO examPaperQuestionCustomerAnswerToExamPaperAnswerItemVO(ExamPaperQuestionCustomerAnswer examPaperQuestionCustomerAnswer);

    int updateScore(List<ExamPaperAnswerUpdate> examPaperAnswerUpdates);

    PageInfo<QuestionPageStudentVO> page(QuestionPageStudentDTO questionPageStudentDTO, User user);

    QuestionSelectStudentVO select(Integer id);
}
